package com.ssd.controller.operation;

import com.ssd.entity.PointsRecordTotal;
import com.ssd.entity.dto.request.PointsRecordTotalPageReqDTO;
import com.ssd.service.IPointsRecordTotalService;
import com.ssd.viewmodel.Pager;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "运营端-用户积分表控制器")
@RequestMapping("/operation/pointsRecordTotal")
@RestController("operationPointsRecordTotalController")
public class PointsRecordTotalController {
    @Resource
    private IPointsRecordTotalService pointsRecordTotalService;


    /**
     * 查询用户积分列表
     */
    @ApiOperation("查询用户积分列表")
    @GetMapping("/list")
    public Pager<PointsRecordTotal> list(PointsRecordTotalPageReqDTO pointsRecordTotalPageReqDTO)
    {
        return pointsRecordTotalService.selectPointsRecordTotalList(pointsRecordTotalPageReqDTO);
    }


    /**
     * 删除用户积分数据
     */
    @ApiOperation("删除用户积分数据")
    @DeleteMapping("/{ids}")
    public void remove(@PathVariable Long[] ids)
    {
        pointsRecordTotalService.deletePointsRecordTotalByIds(ids);
    }

}
